package cn.com.server.entity;

import java.io.Serializable;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * <p>
 * 资源表
 * </p>
 *
 * @author qing
 * @since 2017-11-20
 */
public class Resource implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	private Long id;
    /**
     * 资源父id
     */
	private Long parentId;
    /**
     * 资源名
     */
	private String name;
    /**
     * 权限
     */
	private String permission;
    /**
     * 请求连接
     */
	private String url;
    /**
     * 状态，1正常
     */
	private Integer status;
    /**
     * 类型，0菜单，1功能
     */
	private Integer type;
    /**
     * 图标
     */
	private String icon;
    /**
     * 备注
     */
	private String remark;
    /**
     * 创建时间
     */
	private Date createTime;
    /**
     * 序号
     */
	private Integer sequence;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",locale="zh",timezone = "GMT+8")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getSequence() {
		return sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}

	@Override
	public String toString() {
		return "Resource{" +
			"id=" + id +
			", parentId=" + parentId +
			", name=" + name +
			", permission=" + permission +
			", url=" + url +
			", status=" + status +
			", type=" + type +
			", icon=" + icon +
			", remark=" + remark +
			", createTime=" + createTime +
			", sequence=" + sequence +
			"}";
	}
}
